#include <iostream>
#include <algorithm>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
	string src[1000];
	int n=0;
	while(getline(cin,src[n])&&src[n]!=""){
		n++;
	} 
	sort(src,src+n);
	int temp=1;
	int i=0;
	while(i<n){
		if(src[i+1]!=src[i]){
			cout<<src[i]<<":"<<setiosflags(ios::fixed)<<setprecision(3)<<float(temp)/float(n)<<endl;
			temp=1;
			i++;
		}
		else {
			temp++;
			i++; 
		}
	}
	return 0;
}

